<template>
  <div>
    <p class="title">周一到周四新品首发</p>
    <div class="con">
      <div
        class="con-item"
        v-for="obj in goodlist"
        :key="obj.id"
        @click="
          $router.push({
            path: '/desc',
            query: {
              id: obj.id,
            },
          })
        "
      >
        <img :src="obj.list_pic_url" alt="" />
        <p>{{ obj.name }}</p>
        <span>${{ obj.retail_price }}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "NewGoodsList",
  props: {
    goodlist: {
      type: Array,
    },
  },
  created() {},
};
</script>

<style scoped lang="scss">
.con {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;

  .con-item {
    display: flex;
    flex-direction: column;
    width: 40%;
    font-size: 30px;
    color: #999;
    img {
      width: 100%;
    }
  }
}
.title {
  text-align: center;
  font-size: 40px;
  color: #666;
  padding: 20px 0;
}
</style>
